import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { MapOptions,Point,NavigationControlOptions,NavigationControlType,ControlAnchor } from 'angular2-baidu-map';


/**
 * Generated class for the BaidumapPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-baidumap',
  templateUrl: 'baidumap.html',
})
export class BaidumapPage {

  options: MapOptions;
  point: Point;
  navOptions: NavigationControlOptions;
  constructor(public navCtrl: NavController, public navParams: NavParams,) {
    this.options = {
      centerAndZoom: {
        lat:navParams.get("latitude"),
        lng:navParams.get("longitude"),
        zoom: 16
      },
      enableKeyboard: true
    };
    this.point = {
      lat: navParams.get("latitude"),
      lng: navParams.get("longitude")
    };
    this.navOptions = {
      anchor: ControlAnchor.BMAP_ANCHOR_TOP_RIGHT,
      type: NavigationControlType.BMAP_NAVIGATION_CONTROL_PAN
    };

  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad BaidumapPage');
    console.log(this.navParams.get("latitude"))
    console.log(this.navParams.get("longitude"))
   
  }

  

  

  

}
